package com.cgq.utils;

import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {

	public static String readByKey(String fileName,String key) throws Exception
	{
		InputStream in = PropertiesUtil.class.getClassLoader().getResourceAsStream(fileName+".properties");
		 Properties p = new Properties();
		 p.load(in);		
		return p.getProperty(key);
	}
	
	public static String getPStatusStr(int value){
		String result="";
		switch (value) {
		case 1:
			result="在售";
			break;
		case 2:
			result="待售";
			break;
		case 3:
			result="售完";
			break;
		case 4:
			result="在租";
			break;
		default:
			break;
		}
		return result;
	}
}
